using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Linq2Crm.Request
{
	public abstract class RequestBase
	{
		protected RequestBase(Type type)
		{
			DomainObjectType = type;
		}

		public IQueryable Query { get; set; }
		internal Type DomainObjectType { get; set; }				

		public static IQueryable<T> CreateQuery<T>()
		{
			return new List<T>().AsQueryable();
		}

		internal abstract void Execute();

		internal abstract Task<ResponseBase> ExecuteAsync();
	}
}